<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>游戏后台管理系统</title>
    <link rel="stylesheet" href=" https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css ">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
        }

        :root {
            --primary: #6a11cb;
            --secondary: #2575fc;
            --accent: #ff6b6b;
            --dark: #1e1e2d;
            --light: #f8f9fa;
            --gray: #6c757d;
            --success: #28a745;
            --warning: #ffc107;
            --danger: #dc3545;
            --sidebar-width: 250px;
            --header-height: 70px;
            --transition: all 0.3s ease;
        }

        body {
            background-color: #f5f7fb;
            color: #333;
            overflow-x: hidden;
        }

        /* 登录页面样式 */
        #login-page {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            background-size: 400% 400%;
            animation: gradientBG 15s ease infinite;
            padding: 20px;
        }

        @keyframes gradientBG {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        .login-container {
            width: 100%;
            max-width: 420px;
            background: rgba(255, 255, 255, 0.08);
            backdrop-filter: blur(12px);
            border-radius: 16px;
            padding: 40px 30px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
            border: 1px solid rgba(255, 255, 255, 0.1);
            transform: scale(1);
            transition: transform 0.4s ease, box-shadow 0.4s ease;
            will-change: transform;
        }

        .login-container:hover {
            transform: scale(1.02);
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
        }

        .header {
            text-align: center;
            margin-bottom: 35px;
        }

        .logo {
            width: 80px;
            height: 80px;
            background: linear-gradient(135deg, #ff8a00, #e52e71);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 15px;
            box-shadow: 0 4px 20px rgba(229, 46, 113, 0.5);
        }

        .logo i {
            font-size: 40px;
            color: white;
        }

        .header h1 {
            color: white;
            font-size: 28px;
            font-weight: 600;
            letter-spacing: 1px;
            margin-bottom: 8px;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        }

        .header p {
            color: rgba(255, 255, 255, 0.7);
            font-size: 16px;
        }

        .form-group {
            position: relative;
            margin-bottom: 25px;
            transition: transform 0.3s ease;
        }

        .form-group:focus-within {
            transform: scale(1.02);
        }

        .form-group i {
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: rgba(255, 255, 255, 0.7);
            font-size: 18px;
            transition: color 0.3s ease;
        }

        .form-control {
            width: 100%;
            padding: 14px 14px 14px 45px;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 8px;
            color: white;
            font-size: 16px;
            transition: all 0.3s ease;
        }

        .form-control::placeholder {
            color: rgba(255, 255, 255, 0.5);
        }

        .form-control:focus {
            outline: none;
            background: rgba(255, 255, 255, 0.15);
            border-color: rgba(255, 255, 255, 0.4);
            box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.2);
        }

        .form-group:focus-within i {
            color: #ff8a00;
        }

        .password-toggle {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: rgba(255, 255, 255, 0.7);
            cursor: pointer;
            font-size: 18px;
            transition: color 0.3s ease;
        }

        .password-toggle:hover {
            color: #ff8a00;
        }

        .options {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
            font-size: 14px;
        }

        .remember {
            display: flex;
            align-items: center;
            color: rgba(255, 255, 255, 0.7);
        }

        .remember input {
            margin-right: 8px;
            accent-color: #ff8a00;
        }

        .forgot-password {
            color: #ff8a00;
            text-decoration: none;
            transition: color 0.3s ease;
        }

        .forgot-password:hover {
            color: #ffad33;
            text-decoration: underline;
        }

        .login-btn {
            width: 100%;
            padding: 14px;
            background: linear-gradient(to right, #ff8a00, #e52e71);
            border: none;
            border-radius: 8px;
            color: white;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(229, 46, 113, 0.4);
            letter-spacing: 1px;
            position: relative;
            overflow: hidden;
            z-index: 1;
        }

        .login-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(to right, #ff9a2d, #ff3b7d);
            transition: all 0.6s ease;
            z-index: -1;
        }

        .login-btn:hover::before {
            left: 0;
        }

        .login-btn:hover {
            box-shadow: 0 6px 20px rgba(229, 46, 113, 0.6);
        }

        .login-btn:active {
            transform: translateY(1px);
        }

        .footer {
            text-align: center;
            margin-top: 25px;
            color: rgba(255, 255, 255, 0.6);
            font-size: 14px;
        }

        .version {
            display: block;
            margin-top: 8px;
            font-size: 12px;
        }

        /* 后台管理页面样式 */
        #admin-dashboard {
            display: none;
        }

        .admin-header {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: var(--header-height);
            background: linear-gradient(to right, var(--dark), #2c2c3e);
            color: white;
            display: flex;
            align-items: center;
            padding: 0 20px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            z-index: 1000;
        }

        .toggle-sidebar {
            background: none;
            border: none;
            color: white;
            font-size: 20px;
            cursor: pointer;
            margin-right: 20px;
        }

        .admin-title {
            font-size: 22px;
            font-weight: 600;
        }

        .admin-title span {
            color: var(--accent);
        }

        .user-info {
            margin-left: auto;
            display: flex;
            align-items: center;
        }

        .user-info img {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            margin-right: 10px;
            object-fit: cover;
        }

        .logout-btn {
            background: none;
            border: none;
            color: white;
            margin-left: 20px;
            cursor: pointer;
            transition: color 0.3s;
        }

        .logout-btn:hover {
            color: var(--accent);
        }

        .admin-container {
            display: flex;
            min-height: 100vh;
            padding-top: var(--header-height);
        }

        .sidebar {
            width: var(--sidebar-width);
            background: var(--dark);
            color: white;
            height: calc(100vh - var(--header-height));
            position: fixed;
            left: 0;
            top: var(--header-height);
            transition: var(--transition);
            z-index: 999;
            overflow-y: auto;
        }

        .sidebar.collapsed {
            transform: translateX(-100%);
        }

        .sidebar-menu {
            list-style: none;
            padding: 20px 0;
        }

        .menu-title {
            padding: 15px 20px;
            font-size: 14px;
            color: #8a8d97;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .menu-item {
            padding: 12px 20px;
            display: flex;
            align-items: center;
            cursor: pointer;
            transition: var(--transition);
            border-left: 3px solid transparent;
        }

        .menu-item:hover, .menu-item.active {
            background: rgba(255, 255, 255, 0.05);
            border-left: 3px solid var(--accent);
        }

        .menu-item i {
            margin-right: 12px;
            font-size: 18px;
            width: 24px;
            text-align: center;
        }

        .menu-item span {
            flex: 1;
        }

        .submenu {
            padding-left: 20px;
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease;
        }

        .submenu.show {
            max-height: 500px;
        }

        .submenu-item {
            padding: 10px 0 10px 40px;
            display: flex;
            align-items: center;
            cursor: pointer;
            transition: var(--transition);
        }

        .submenu-item:hover, .submenu-item.active {
            color: var(--accent);
        }

        .submenu-item i {
            font-size: 12px;
            margin-right: 10px;
        }

        .main-content {
            flex: 1;
            padding: 30px;
            margin-left: var(--sidebar-width);
            transition: var(--transition);
        }

        .main-content.expanded {
            margin-left: 0;
        }

        .breadcrumb {
            margin-bottom: 30px;
            display: flex;
            align-items: center;
            color: var(--gray);
        }

        .breadcrumb a {
            color: var(--secondary);
            text-decoration: none;
        }

        .breadcrumb i {
            margin: 0 10px;
            font-size: 12px;
        }

        .page-title {
            font-size: 24px;
            margin-bottom: 20px;
            color: var(--dark);
            display: flex;
            align-items: center;
        }

        .page-title i {
            margin-right: 10px;
            color: var(--secondary);
        }

        .card {
            background: white;
            border-radius: 10px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
            margin-bottom: 30px;
            overflow: hidden;
            transition: var(--transition);
        }

        .card:hover {
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
            transform: translateY(-3px);
        }

        .card-header {
            padding: 20px;
            border-bottom: 1px solid #eee;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .card-title {
            font-size: 18px;
            font-weight: 600;
            color: var(--dark);
        }

        .card-body {
            padding: 20px;
        }

        .card-footer {
            padding: 15px 20px;
            background: #f9f9f9;
            border-top: 1px solid #eee;
            display: flex;
            justify-content: flex-end;
        }

        .btn {
            padding: 8px 16px;
            border-radius: 5px;
            border: none;
            cursor: pointer;
            font-weight: 500;
            transition: var(--transition);
            display: inline-flex;
            align-items: center;
        }

        .btn i {
            margin-right: 5px;
        }

        .btn-primary {
            background: linear-gradient(to right, var(--primary), var(--secondary));
            color: white;
        }

        .btn-primary:hover {
            opacity: 0.9;
        }

        .btn-success {
            background: var(--success);
            color: white;
        }

        .btn-danger {
            background: var(--danger);
            color: white;
        }

        .btn-outline {
            background: transparent;
            border: 1px solid var(--gray);
            color: var(--gray);
        }

        .btn-outline:hover {
            background: #f8f9fa;
        }

        .table-responsive {
            overflow-x: auto;
        }

        .table {
            width: 100%;
            border-collapse: collapse;
        }

        .table th, .table td {
            padding: 15px;
            text-align: left;
            border-bottom: 1px solid #eee;
        }

        .table th {
            background-color: #f8f9fa;
            font-weight: 600;
            color: var(--dark);
        }

        .table tr:hover {
            background-color: #f8f9fa;
        }

        .table .actions {
            display: flex;
            gap: 10px;
        }

        .form-group-admin {
            margin-bottom: 20px;
        }

        .form-group-admin label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: var(--dark);
        }

        .form-control-admin {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 16px;
            transition: var(--transition);
        }

        .form-control-admin:focus {
            outline: none;
            border-color: var(--secondary);
            box-shadow: 0 0 0 3px rgba(37, 117, 252, 0.1);
        }

        .form-row {
            display: flex;
            gap: 20px;
            margin-bottom: 20px;
        }

        .form-col {
            flex: 1;
        }

        .stats-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .stat-card {
            background: white;
            border-radius: 10px;
            padding: 20px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
            display: flex;
            align-items: center;
            transition: var(--transition);
        }

        .stat-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
        }

        .stat-icon {
            width: 60px;
            height: 60px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 20px;
            font-size: 24px;
            color: white;
        }

        .stat-icon.users {
            background: linear-gradient(to right, #6a11cb, #2575fc);
        }

        .stat-icon.roles {
            background: linear-gradient(to right, #ff6b6b, #ff8e53);
        }

        .stat-icon.departments {
            background: linear-gradient(to right, #42e695, #3bb2b8);
        }

        .stat-icon.positions {
            background: linear-gradient(to right, #f093fb, #f5576c);
        }

        .stat-info h3 {
            font-size: 24px;
            margin-bottom: 5px;
        }

        .stat-info p {
            color: var(--gray);
        }

        .pagination {
            display: flex;
            justify-content: center;
            margin-top: 30px;
        }

        .page-item {
            margin: 0 5px;
        }

        .page-link {
            display: block;
            width: 40px;
            height: 40px;
            line-height: 40px;
            text-align: center;
            border-radius: 5px;
            background: #f8f9fa;
            color: var(--dark);
            text-decoration: none;
            transition: var(--transition);
        }

        .page-link:hover, .page-link.active {
            background: var(--secondary);
            color: white;
        }

        /* 响应式设计 */
        @media (max-width: 992px) {
            .sidebar {
                transform: translateX(-100%);
            }
            .sidebar.show {
                transform: translateX(0);
            }
            .main-content {
                margin-left: 0;
            }
        }

        @media (max-width: 768px) {
            .form-row {
                flex-direction: column;
                gap: 0;
            }
            .stats-container {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 480px) {
            .login-container {
                padding: 30px 20px;
            }
            .header h1 {
                font-size: 24px;
            }
            .logo {
                width: 70px;
                height: 70px;
            }
            .admin-title {
                font-size: 18px;
            }
            .user-info span {
                display: none;
            }
        }
    </style>
</head>
<body>
<!-- 登录页面 -->
<div id="login-page">
    <div class="login-container">
        <div class="header">
            <div class="logo">
                <i class="fas fa-gamepad"></i>
            </div>
            <h1>游戏后台管理系统</h1>
            <p>安全登录您的管理员账户</p>
        </div>

        <form id="loginForm">
            <div class="form-group">
                <i class="fas fa-user"></i>
                <input type="text" class="form-control" id="username" placeholder="用户名" required>
            </div>

            <div class="form-group">
                <i class="fas fa-lock"></i>
                <input type="password" class="form-control" id="password" placeholder="密码" required>
                <button type="button" class="password-toggle" id="togglePassword">
                    <i class="fas fa-eye"></i>
                </button>
            </div>

            <div class="options">
                <label class="remember">
                    <input type="checkbox"> 记住我
                </label>
                <a href="#" class="forgot-password">忘记密码?</a>
            </div>

            <button type="submit" class="login-btn">登 录</button>
        </form>

        <div class="footer">
            © 2025 游戏后台管理系统 | 管理员专用
            <span class="version">版本: v3.8.2</span>
        </div>
    </div>
</div>

<!-- 后台管理页面 -->
<div id="admin-dashboard">
    <header class="admin-header">
        <button class="toggle-sidebar" id="toggleSidebar">
            <i class="fas fa-bars"></i>
        </button>
        <div class="admin-title">游戏<span>后台管理系统</span></div>
        <div class="user-info">
            <img src=" https://randomuser.me/api/portraits/men/41.jpg " alt="管理员">
            <span>管理员</span>
            <button class="logout-btn" id="logoutBtn">
                <i class="fas fa-sign-out-alt"></i>
            </button>
        </div>
    </header>

    <div class="admin-container">
        <aside class="sidebar" id="sidebar">
            <ul class="sidebar-menu">
                <li class="menu-title">主菜单</li>
                <li class="menu-item active">
                    <i class="fas fa-home"></i>
                    <span>控制面板</span>
                </li>

                <li class="menu-title">系统管理</li>
                <li class="menu-item">
                    <i class="fas fa-cog"></i>
                    <span>系统设置</span>
                </li>

                <li class="menu-title">用户管理</li>
                <li class="menu-item">
                    <i class="fas fa-users"></i>
                    <span>用户管理</span>
                </li>

                <li class="menu-title">权限管理</li>
                <li class="menu-item">
                    <i class="fas fa-user-shield"></i>
                    <span>角色管理</span>
                </li>
                <li class="menu-item">
                    <i class="fas fa-bars"></i>
                    <span>菜单管理</span>
                </li>

                <li class="menu-title">组织管理</li>
                <li class="menu-item">
                    <i class="fas fa-sitemap"></i>
                    <span>部门管理</span>
                </li>
                <li class="menu-item">
                    <i class="fas fa-briefcase"></i>
                    <span>岗位管理</span>
                </li>

                <li class="menu-title">其他</li>
                <li class="menu-item">
                    <i class="fas fa-chart-line"></i>
                    <span>数据统计</span>
                </li>
                <li class="menu-item">
                    <i class="fas fa-file-alt"></i>
                    <span>日志管理</span>
                </li>
            </ul>
        </aside>

        <main class="main-content" id="mainContent">
            <div class="breadcrumb">
                <a href="#">首页</a>
                <i class="fas fa-angle-right"></i>
                <span>控制面板</span>
            </div>

            <h1 class="page-title">
                <i class="fas fa-tachometer-alt"></i>控制面板
            </h1>

            <div class="stats-container">
                <div class="stat-card">
                    <div class="stat-icon users">
                        <i class="fas fa-users"></i>
                    </div>
                    <div class="stat-info">
                        <h3>1,254</h3>
                        <p>总用户数</p>
                    </div>
                </div>

                <div class="stat-card">
                    <div class="stat-icon roles">
                        <i class="fas fa-user-shield"></i>
                    </div>
                    <div class="stat-info">
                        <h3>24</h3>
                        <p>角色数量</p>
                    </div>
                </div>

                <div class="stat-card">
                    <div class="stat-icon departments">
                        <i class="fas fa-sitemap"></i>
                    </div>
                    <div class="stat-info">
                        <h3>18</h3>
                        <p>部门数量</p>
                    </div>
                </div>

                <div class="stat-card">
                    <div class="stat-icon positions">
                        <i class="fas fa-briefcase"></i>
                    </div>
                    <div class="stat-info">
                        <h3>56</h3>
                        <p>岗位数量</p>
                    </div>
                </div>
            </div>

            <div class="card">
                <div class="card-header">
                    <div class="card-title">用户管理</div>
                    <button class="btn btn-primary">
                        <i class="fas fa-plus"></i> 添加用户
                    </button>
                </div>
                <div class="card-body">
                    <div class="table-responsive">
                        <table class="table">
                            <thead>
                            <tr>
                                <th>ID</th>
                                <th>用户名</th>
                                <th>角色</th>
                                <th>部门</th>
                                <th>岗位</th>
                                <th>状态</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td>1001</td>
                                <td>admin</td>
                                <td>超级管理员</td>
                                <td>技术部</td>
                                <td>系统架构师</td>
                                <td><span style="color: var(--success);">启用</span></td>
                                <td class="actions">
                                    <button class="btn btn-outline">
                                        <i class="fas fa-edit"></i>
                                    </button>
                                    <button class="btn btn-outline">
                                        <i class="fas fa-trash"></i>
                                    </button>
                                </td>
                            </tr>
                            <tr>
                                <td>1002</td>
                                <td>game_designer</td>
                                <td>设计师</td>
                                <td>设计部</td>
                                <td>高级设计师</td>
                                <td><span style="color: var(--success);">启用</span></td>
                                <td class="actions">
                                    <button class="btn btn-outline">
                                        <i class="fas fa-edit"></i>
                                    </button>
                                    <button class="btn btn-outline">
                                        <i class="fas fa-trash"></i>
                                    </button>
                                </td>
                            </tr>
                            <tr>
                                <td>1003</td>
                                <td>dev_lead</td>
                                <td>开发主管</td>
                                <td>开发部</td>
                                <td>技术主管</td>
                                <td><span style="color: var(--success);">启用</span></td>
                                <td class="actions">
                                    <button class="btn btn-outline">
                                        <i class="fas fa-edit"></i>
                                    </button>
                                    <button class="btn btn-outline">
                                        <i class="fas fa-trash"></i>
                                    </button>
                                </td>
                            </tr>
                            <tr>
                                <td>1004</td>
                                <td>qa_tester</td>
                                <td>测试员</td>
                                <td>质量保证部</td>
                                <td>高级测试工程师</td>
                                <td><span style="color: var(--warning);">禁用</span></td>
                                <td class="actions">
                                    <button class="btn btn-outline">
                                        <i class="fas fa-edit"></i>
                                    </button>
                                    <button class="btn btn-outline">
                                        <i class="fas fa-trash"></i>
                                    </button>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                <div class="card-footer">
                    <div class="pagination">
                        <div class="page-item">
                            <a href="#" class="page-link active">1</a>
                        </div>
                        <div class="page-item">
                            <a href="#" class="page-link">2</a>
                        </div>
                        <div class="page-item">
                            <a href="#" class="page-link">3</a>
                        </div>
                        <div class="page-item">
                            <a href="#" class="page-link">下一页</a>
                        </div>
                    </div>
                </div>
            </div>

            <div class="form-row">
                <div class="form-col">
                    <div class="card">
                        <div class="card-header">
                            <div class="card-title">角色管理</div>
                        </div>
                        <div class="card-body">
                            <div class="table-responsive">
                                <table class="table">
                                    <thead>
                                    <tr>
                                        <th>角色名称</th>
                                        <th>描述</th>
                                        <th>用户数</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr>
                                        <td>超级管理员</td>
                                        <td>系统最高权限角色</td>
                                        <td>1</td>
                                        <td class="actions">
                                            <button class="btn btn-outline">
                                                <i class="fas fa-edit"></i>
                                            </button>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>管理员</td>
                                        <td>系统管理角色</td>
                                        <td>5</td>
                                        <td class="actions">
                                            <button class="btn btn-outline">
                                                <i class="fas fa-edit"></i>
                                            </button>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>开发人员</td>
                                        <td>游戏开发角色</td>
                                        <td>32</td>
                                        <td class="actions">
                                            <button class="btn btn-outline">
                                                <i class="fas fa-edit"></i>
                                            </button>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>测试人员</td>
                                        <td>质量保证角色</td>
                                        <td>18</td>
                                        <td class="actions">
                                            <button class="btn btn-outline">
                                                <i class="fas fa-edit"></i>
                                            </button>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-col">
                    <div class="card">
                        <div class="card-header">
                            <div class="card-title">部门管理</div>
                        </div>
                        <div class="card-body">
                            <div class="table-responsive">
                                <table class="table">
                                    <thead>
                                    <tr>
                                        <th>部门名称</th>
                                        <th>负责人</th>
                                        <th>成员数</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr>
                                        <td>技术部</td>
                                        <td>张技术</td>
                                        <td>25</td>
                                        <td class="actions">
                                            <button class="btn btn-outline">
                                                <i class="fas fa-edit"></i>
                                            </button>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>设计部</td>
                                        <td>李设计</td>
                                        <td>18</td>
                                        <td class="actions">
                                            <button class="btn btn-outline">
                                                <i class="fas fa-edit"></i>
                                            </button>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>市场部</td>
                                        <td>王市场</td>
                                        <td>12</td>
                                        <td class="actions">
                                            <button class="btn btn-outline">
                                                <i class="fas fa-edit"></i>
                                            </button>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>客服部</td>
                                        <td>赵客服</td>
                                        <td>8</td>
                                        <td class="actions">
                                            <button class="btn btn-outline">
                                                <i class="fas fa-edit"></i>
                                            </button>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </main>
    </div>
</div>

<script>
    // 登录页面功能
    const togglePassword = document.getElementById('togglePassword');
    const passwordInput = document.getElementById('password');

    togglePassword.addEventListener('click', function() {
        const type = passwordInput.getAttribute('type') === 'password' ? 'text' : 'password';
        passwordInput.setAttribute('type', type);
        this.innerHTML = type === 'password' ? '<i class="fas fa-eye"></i>' : '<i class="fas fa-eye-slash"></i>';
    });

    const loginForm = document.getElementById('loginForm');

    loginForm.addEventListener('submit', function(e) {
        e.preventDefault();

        const username = document.getElementById('username').value;
        const password = document.getElementById('password').value;

        if(username.trim() === '' || password.trim() === '') {
            alert('请输入用户名和密码');
            return;
        }

        // 模拟登录成功
        const loginBtn = document.querySelector('.login-btn');
        loginBtn.innerHTML = '<i class="fas fa-spinner fa-spin"></i> 登录中...';
        loginBtn.disabled = true;

        setTimeout(() => {
            document.getElementById('login-page').style.display = 'none';
            document.getElementById('admin-dashboard').style.display = 'block';
            loginBtn.innerHTML = '登 录';
            loginBtn.disabled = false;
        }, 1500);
    });

    // 后台管理页面功能
    const toggleSidebar = document.getElementById('toggleSidebar');
    const sidebar = document.getElementById('sidebar');
    const mainContent = document.getElementById('mainContent');
    const logoutBtn = document.getElementById('logoutBtn');

    toggleSidebar.addEventListener('click', function() {
        sidebar.classList.toggle('collapsed');
        mainContent.classList.toggle('expanded');
    });

    logoutBtn.addEventListener('click', function() {
        if(confirm('确定要退出系统吗？')) {
            document.getElementById('admin-dashboard').style.display = 'none';
            document.getElementById('login-page').style.display = 'flex';
        }
    });

    // 响应式处理
    window.addEventListener('resize', function() {
        if(window.innerWidth < 992) {
            sidebar.classList.add('collapsed');
            mainContent.classList.add('expanded');
        } else {
            sidebar.classList.remove('collapsed');
            mainContent.classList.remove('expanded');
        }
    });

    // 初始化
    if(window.innerWidth < 992) {
        sidebar.classList.add('collapsed');
        mainContent.classList.add('expanded');
    }
</script>
</body>
</html>
